<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>烘焙有奖征集活动</title>
    <link rel="stylesheet" href="__CSS__/common.css" />
	<link rel="stylesheet" href="http://www.hongbeiq.com/static/home/css/global.css" />

	 <link rel="stylesheet" href="__CSS__/october.css" />
    <script type="text/javascript" src="__HOMEJS__/jquery-1.7.2.min.js"></script>
 	
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body>
<div class="m-hd">
	<div class="f-hd">
		 <a href="__WEBURL__"><img src="__IMAGE__/october/or_logo.png"></a>
		 <if condition="$userid neq ''">
            <span>
                {$userinfo.nickname} 您好,
                <a href="__WEBURL__/user/index/sysmsg">站内消息<if condition="$sysmsgnum neq 0"><i>({$sysmsgnum})</i></if></a>
                <a href="{:U('/user/index/logout')}" class="nobr">退出登录</a>
            </span>
            <else/>
            <span>
                <a href="{:U('/user/login/login?type=qq')}"><img src="__IMAGE__/icon_top_qq.png" alt=""/>QQ登录</a>
                <a href="{:U('/user/login/login?type=sina')}"><img src="__IMAGE__/icon_top_weibo.png" alt=""/>微博登录</a>
                <a href="__WEBURL__/user/login">登录</a>
                <a href="__WEBURL__/user/login/register" class="nobr">注册</a>
            </span>
           </if>
		   <div style="clear:both"></div>
	</div>
</div>
<div class="m-bd">
	<div class="f-ad"></div>
	<div class="f-ge">
		<div class="f-gt">
			<div class="g-ts">
				<div class="left g-lt">
					<ul>
						<li><span class="g-lt-color">活动时间：</span>2015年11月1日—11月30日</li>
						<li><span class="g-lt-color">活动规则：</span>在活动期间内，上传<b class="g-lt-color">8个烘焙食谱</b>，并审核通过，即可免费领取烘焙礼品套装。</li>
						<li><span class="g-lt-color">活动奖品：</span>活动期间通过审核的爱好者，可以获得<b class="g-lt-color">烘焙礼品套装</b>：舒可曼糖粉糖霜1包、舒可曼大豆色拉油1瓶、舒可曼低筋面粉1包、“纯乐制造”高级6寸戚风模具1套。</li>
					</ul>
				</div>
				<div class="left g-rt">
					<div class="tie">已上传了<span class="g-rt-color">{$number}</span>作品，您也赶快来吧~</div>
					<div class="text" id="scrollDiv">
						<ul>
							<volist name="works" id="value">
								<li><nobr><b>{$value.nickname}</b>&nbsp;上传了&nbsp;{$value.title}</nobr></li>
							</volist>
							<volist name="oworks" id="value">
								<li> <nobr><b>{$value.nickname}</b>&nbsp;上传&nbsp;{$value.title}</nobr></li>
							</volist>
							
						</ul>
					</div>
				</div>
				<div class="clear"></div>
			</div>
		</div>
		<div class="f-gd">
			<ul>
				<li class="m-gd-tl">
					<img src="__IMAGE__/october/or_tltie.jpg">
				</li>
				<li>
					<div class="f-gi">
						<ul>
							<li class="left m-f-gi"><img src="__IMAGE__/october/or_gift1.png"></li>
							<li class="left m-f-gi">
								<p class="gi-tiel">舒可曼 糖粉糖霜</p>
								<p class="gi-rl">选用优质细砂糖为原料，经专业细磨设备精心磨制并混合恰当比例的优质玉米淀粉制作而成，色泽洁白、质感细滑，无论是用来装饰糕点表面还是用做烘焙原料，它都能为你的作品增添风味。</p>
							</li>
							<li class="left m-f-gi">
								<p class="gi-tiel" style="margin-left:100px; margin-top:15px;">舒可曼色拉油</p>
								<p class="gi-lt">色拉油可用于生吃，因特别适用于西餐"色拉"凉拌菜而得名。色拉油呈淡黄色，澄清、透明、无气味、口感好，用于烹调时不起沫、烟少，能保持菜肴的本色本味，由于它的无气味、口感好，不影响烘焙口感，在烘焙行业很受欢迎。</p>
							</li>
							<li class="left m-f-gi"><img src="__IMAGE__/october/or_gift2.png"></li>
							<li class="left m-f-gi"><img src="__IMAGE__/october/or_gift3.png"></li>
							<li class="left m-f-gi">
								<p class="gi-tiel" style="margin-top:40px; margin-left:10px;">舒可曼 低筋面粉</p>
								<p class="gi-rl" style="margin-left:10px;">舒可曼面粉100%采用来自美国、澳洲等全球优质产区的小麦，经世界级的瑞士布勒生产线，搭配日本佐竹剥皮制粉工艺磨制而成，适合做蛋糕、饼干、蛋挞等松散、酥脆、没有韧性的点心，产品纯正优质，是家族烘焙信赖之选 ！</p>
							</li>
							<li class="left m-f-gi">
								<p class="gi-tiel" style="margin-left:100px; margin-top:40px;">纯乐自造 月光银6寸活底戚风模具</p>
								<p class="gi-lt">选用高品质重型钢材，结合一体冲压成型工艺，使模具拥有无与伦比的钢性，长期使用不变形进口的月光银不粘涂层，独特的三层喷涂处理工艺，成就涂层的超耐磨与不粘性能，脱模轻松简单。</p>
							</li>
							<li class="left m-f-gi"><img src="__IMAGE__/october/or_gift4.png"></li>
						
							<div class="clear"></div>
						</ul>
						
					</div>
				</li>
				<li class="m-gd-mi"><a href="/jifen"><img src="__IMAGE__/october/or_ggil.jpg"></a></li>
				<li class="m-gd-zs">
					<a href="javascript:void(0);" class="onZshe" oil="北美进口蓝莓干|我要兑换|/jifen/detail/17.html"><img src="__IMAGE__/october/or_mo1.jpg"></a>
					<a href="javascript:void(0);" class="onZshe" oil="加拿大原装进口枫糖浆|我要兑换|/jifen/detail/20.html"><img src="__IMAGE__/october/or_mo2.jpg"></a>
					<a href="javascript:void(0);" class="onZshe" oil="凯旋门高筋面粉|我要兑换|/jifen/detail/23.html"><img src="__IMAGE__/october/or_mo3.jpg"></a>
					<a href="javascript:void(0);" class="onZshe" oil="加拿大原装进口 草莓果酱|我要兑换|/jifen/detail/30.html"><img src="__IMAGE__/october/or_mo4.jpg"></a>
					<div class="clear"></div>
				</li>
				<li class="m-gd-ex"><img src="__IMAGE__/october/or_exes1.jpg"><a href="/user/bake/worksadd"><!--<a href="javascript:void(0);" onClick="tikong()">--><img src="__IMAGE__/october/or_exes2.jpg"></a></li>
				<li class="m-gd-exs">
					<table width="100%" border="0" cellpadding="0" cellspacing="0">
					  <tr>
						<td>
							<if condition="$works.0 neq ''">
							<a href="javascript:void(0);" class="onExses es-wh" oil="{$works.0.title}|查看作品|/works/{$works.0.workid}"><img src="{$works.0.image}"></a>
							<else/>
							<a href="javascript:void(0);" class="onExses es-wh" oil="{$oworks.0.title}|查看作品|/works/{$oworks.0.workid}"><img src="{$oworks.0.image}"></a>
							</if>
						</td>
						<td>
						<if condition="$works.1 neq ''">
						   <a href="javascript:void(0);" class="onExses es-wh" oil="{$works.1.title}|查看作品|/works/{$works.1.workid}"><img src="{$works.1.image}"></a>
						 <else/>
							<a href="javascript:void(0);" class="onExses es-wh" oil="{$oworks.1.title}|查看作品|/works/{$oworks.1.workid}"><img src="{$oworks.1.image}"></a>
						 </if>
						</td>
						<td>
						<if condition="$works.2 neq ''">
							<a href="javascript:void(0);" class="onExses" oil="{$works.2.title}|查看作品|/works/{$works.2.workid}" style="width:440px;"><img src="{$works.2.image}" height="365"></a>
						<else/>
							<a href="javascript:void(0);" class="onExses" oil="{$oworks.2.title}|查看作品|/works/{$oworks.2.workid}" style="width:440px;"><img src="{$oworks.2.image}" height="365"></a>
						</if>	
					   </td>
					  </tr>
					</table>
					<table width="100%" border="0" cellpadding="0" cellspacing="0">
					  <tr>
						<td >
						<if condition="$works.3 neq ''">
						 	<a href="javascript:void(0);" style=" height:177px;" class="onExses es-whh" oil="{$works.3.title}|查看作品|/works/{$works.3.workid}"><img src="{$works.3.image}"></a>
						<else/>
							<a href="javascript:void(0);" style=" height:177px;" class="onExses es-whh" oil="{$oworks.3.title}|查看作品|/works/{$oworks.3.workid}"><img src="{$oworks.3.image}"></a>
						</if>
						 </td>
						<td rowspan="2">
						<if condition="$works.4 neq ''">
						    <a href="javascript:void(0);" class="onExses es-whs" oil="{$works.4.title}|查看作品|/works/{$works.4.workid}"><img src="{$works.4.image}"></a>
						<else/>
							<a href="javascript:void(0);" class="onExses es-whs" oil="{$oworks.4.title}|查看作品|/works/{$oworks.4.workid}"><img src="{$oworks.4.image}"></a>
						</if>
						</td>
						<td width="190" rowspan="2">
						<if condition="$works.5 neq ''">
							<a href="javascript:void(0);" class="onExses es-whes" oil="{$works.5.title}|查看作品|/works/{$works.5.workid}"><img src="{$works.5.image}"></a>
						<else/>
							<a href="javascript:void(0);" class="onExses es-whes" oil="{$oworks.5.title}|查看作品|/works/{$oworks.5.workid}"><img src="{$oworks.5.image}"></a>
						</if>
						</td>
					  </tr>
					  <tr>
						<td >
						<if condition="$works.6 neq ''">
							<a href="javascript:void(0);" style="height:178px;" class="onExses es-whh"oil="{$works.6.title}|查看作品|/works/{$works.6.workid}"><img src="{$works.6.image}"></a>
						<else/>
							<a href="javascript:void(0);" style="height:178px;" class="onExses es-whh"oil="{$oworks.6.title}|查看作品|/works/{$oworks.6.workid}"><img src="{$oworks.6.image}"></a>

						</if>
						</td>
					  </tr>
					</table>

				</li>
			</ul>
			<div class="g-bbs">
					<h2 class="g-bbs-ti">活动的评论({$count}个)</h2>
					<div class="b-zyn">
						<if condition="$userid neq ''">
						<a href="__WEBURL__/u/{$userinfo.openuid}" class="b-zyn__pic">
							<img class="l-full" src="{$userinfo.uavatar|getUavatar}" alt="">
						</a>
						<else/>
						<a href="javascript:void(0);" class="b-zyn__pic">
							<img class="l-full" src="/static/home/images/default_touxiang.jpg" alt="">
						</a>
					   </if>
					   
					   
						<textarea name="content" id="content" cols="30"  required="" data-len="10" rows="10" class="b-texte"></textarea>
						<button class="b-btn" id="sendMsg_btn">评论</button>
						
	
					</div>
					<div class="g-bbs-div">
						<!--评论开始-->
						<volist name="octoberData" id="value">
							<div class="b-item">
							<div class="left b-itm-lt">
								<a href="/u/{$value.openuid}" class="yf-huiying__pic">
								
								<if condition="$value.htp eq 'http://' ">
								<img src="{$value.uavatar}" class="uavatar_50">
								<else/>
								<img src="{$value.uavatar|getUavatar}" class="uavatar_50">
								</if>
									
								</a>
								<span >{$value.nickname}</span>
							</div>
							<div class="left b-itm-re">
								<p class="b-itm-con">{$value.content}<br>
									<small>{$value.create_time|format_time}</small>
									<small class="b-itm-right">
									<if condition="$value.userid eq $userid">
										<span style="color:#ff7b00;">我的留言</span>-<a href="javascript:;" class="b-send ondelete" data-id="{$value.id}">删 除</a>
									<else/>
										<a href="javascript:;" class="b-send openReply_btn" data-user="{$value.nickname}" data-id="{$value.id}">回 复</a>
									</if>
									
									</small>				
								</p>
								<if condition="$value.sou neq ''">
									<div class="yf-child">
										<volist name="value.sou" id="one">
											<div class="g-list">
												<div class="g-list-lt">
													<a href="/u/{$one.openuid}">
													<if condition="$one.htp eq 'http://'">
													<img src="{$one.uavatar}" style="width:30px;">
													<else/>
													<img src="{$one.uavatar|getUavatar}" style="width:30px;">
													</if>
													</a>
												</div>
												<div class="g-list-rt">
													<p class="b-itm-con"><span class="b-mem">@{$one.tousername}：</span>{$one.content}<br>
														<small>{$one.create_time|format_time}</small>
														<small class="b-itm-right">
															<if condition="$one.userid eq $userid">
																<span style="color:#ff7b00;">我的留言</span>-<a href="javascript:;" class="b-send ondelete" data-id="{$one.id}">删 除</a>
															<else/>
																<a href="javascript:;" class="b-send openReply_btn" data-user="{$one.nickname}" data-id="{$value.id}">回 复</a>
															</if>
														
														</small>				
													</p>
												</div>
												<div class="clear"></div>
											</div>
										</volist>
									
									</div>
								</if>
							</div>
							<div class="clear"></div>
						</div>
						</volist>
						<!--评论结束-->
						
						<div class="pager">{$page}</div>
					</div>
			</div>
		</div>
	</div>
</div>
<Admintemplate file="Home/Public/footer"/>

<script type="text/javascript">

	function AutoScroll(obj) {

		$(obj).find("ul:first").animate({
			marginTop: "-25px"
		}, 250, function() {
			$(this).css({ marginTop: "0px" }).find("li:first").appendTo(this);
		});
	}
	$(document).ready(function() {
		var myar = setInterval('AutoScroll("#scrollDiv")', 800)
		$("#scrollDiv").hover(function() { clearInterval(myar); }, function() { myar = setInterval('AutoScroll("#scrollDiv")', 800) }); //当鼠标放上去的时候，滚动停止，鼠标离开的时候滚动开始
	});
</script>
<script type="text/javascript">

$(document).ready(function(){
	$(".onZshe").hover(function(){
		 exhChan(this,'preview');
	 },function(){
		$("#preview").remove();
	});
	
	$(".onExses").hover(function(){
		 exhChan(this,'prExses');
	 },function(){
		$("#prExses").remove();
	});
	
	 $("#sendMsg_btn").click(function(){
	 	 var con = $("#content").val();
		 var  y = $(this).offset().top - 200;
		 var  x = $(this).offset().left - 200;
		 var  hm = '';
		 if(con.length < 2){
		 	tipMessage("活动的评论不能少于2字符",y,x);
		 }else{
		 	$.post("/toppic/october/addAjax",
			{
			  con:con
			},
			function(data){
			   if(data == 'NO'){
			   		hm = "只有会员才能进行此操作 <a href='/user/login?backurl=http://www.hongbeiq.com/toppic/october/index'>登入</a>";
			   		tipMessage(hm,y,x);
			   }else{
			   		window.location.reload();
			   }
			});
		 }
 		 setTimeout(tipMessageReove,3000); //延伸处理函数       
 	});
	
	
	    //留言回复按钮
    $(".openReply_btn").on('click',function(e){
        e.preventDefault();
        if ($(this).hasClass('cancel-reply')) {
            $(this).removeClass('cancel-reply').html("回复");
            $(".b-list-reply").remove();
        }else{
            var user = $(this).attr('data-user'),
                oid = $(this).attr('data-id'),
				todata = user + '|' + oid;
                reply=$(".list-reply");
            if(reply.length>0){
                $(".b-huiying__btn").removeClass('cancel-reply').html("回复");
                reply.remove();
            }
            $(this).addClass('cancel-reply').html("取消");
            var str="<div class='b-list-reply'><input type='hidden' name='todata' value='"+todata+"'/><textarea name='contentes' class='b-textes' placeholder='@"+user+"'></textarea><button class='b-btn huiying-btn' style='margin-top:5px'>回 复</button></div>";
			$(".b-list-reply").remove();
            $(this).parent().parent().append(str);
        };
    });
	
	$('.g-bbs-div').on('click','.huiying-btn',function(){
		 var con = $("textarea[name='contentes']").val();
		 var todata = $("input[name='todata']").val();
		 var da = '';
		 var  y = $(this).offset().top - 200;
		 var  x = $(this).offset().left - 200;
		 var  hm = '';
		 da = todata.split('|');
		
		 if(con.length < 2){
		 	tipMessage("活动的评论不能少于2字符",y,x);
		 }else{
		 	$.post("/toppic/october/addAjax",
			{
			  con:con,
			  tousername:da[0],
			  octoberid:da[1]
			},
			function(data){
			   if(data == 'NO'){
			   		hm = "只有会员才能进行此操作 <a href='/user/login?backurl=http://www.hongbeiq.com/toppic/october/index'>登入</a>";
			   		tipMessage(hm,y,x);
			   }else{
			   		window.location.reload();
			   }
			});
		 }
 		 setTimeout(tipMessageReove,3000); //延伸处理函数
	});
	
	
	$(".ondelete").click(function(){
	   var rt = '';
	   var  y = $(this).offset().top - 200;
	   var  x = $(this).offset().left - 200;
	   rt = confirm('你确定要删除这个评论吗？');
	  if(rt){
	  	 var id = $(this).attr('data-id');
		 $.post("/toppic/october/deleteAjax",
			{
			  id:id
			},
			function(data){
			   if(data == 'NO'){
			   		hm = "删除评论失败！";
			   		tipMessage(hm,y,x);
			   }else{
			   		window.location.reload();
			   }
			});
		  setTimeout(tipMessageReove,3000); //延伸处理函数 
		 }
	});
	
	
});


function exhChan(e,id){
	var d = $(e).attr('oil');
	var dt = d.split("|");
	
	$(e).append("<div id='"+id+"'>"+dt[0]+"<br/><br/><a href='"+dt[2]+"' class='pr-view'>"+dt[1]+"</a></div>");
	
	if(id == 'prExses'){
		var h = $(e).height();
		var wh = (h/2)-30;
		$("#prExses").css({
			paddingTop: wh + "px"
		});
	}
	
	
}

function tipMessage(text,t,lt){
	 $("body").append("<div id='tipMessage' class='tip_message'><div class='tip_message_content'><span class='tip_ico_hits'></span><span class='tip_content' id='tip_content'>"+text+"</span><span class='tip_end'></span></div></div>");
	 $("#tipMessage").css({
	 	opacity: '10',
		zIndex: '99999999',
		display: 'block',
		top: t + 'px', 
		left: lt + 'px',
		width: '300px'
	 });
	 
}

function tipMessageReove(){
	$("#tipMessage").remove();
}

function tikong(){
	alert("活动暂时还没开始！请你11月1日再来！");
}

</script>

</body>
</html>